from py2neo import Graph, Node, Relationship, NodeMatcher

graph = Graph("bolt://localhost:7687", auth=("neo4j", "12345678"))
# result = graph.run("MATCH (p:Person) RETURN p.name,p.age LIMIT 5")
# for record in result:
#    print(record["p.name"], record["p.age"])

matcher = NodeMatcher(graph)

# zhangsan = matcher.match("Person", name="张三").first()
# zhangsan["age"] = 30
# graph.push(zhangsan)


graph.run("MATCH (p:Person {name:'张三'}) set p.age =100")
